var app = getApp();
Page({
    data: {
        siteInfo: app.siteInfo,
        address: [],                  // 地址列表
    },
    onLoad: function (e) {
        var that = this;
        app.initPage();
    },

    onShow() {
        this.setData({
            address: [
                {
                    index: 1,
                    usrname: '陈大大',                                 //姓名
                    usrphone: '1334885656',                           //手机号码
                    region: '安徽省 合肥市 庐阳区', //地区
                    address: '融侨悦城（融侨悦城阜阳北路与耀远路交口）',  //地址
                    postcode: '230001',                                 //邮编
                },
                {
                    index: 2,
                    usrname: '陈sd',                                 //姓名
                    usrphone: '1334885656',                           //手机号码
                    region: '安徽省 合肥市 庐阳区', //地区
                    address: '融侨悦城（融侨悦城阜阳北路与耀远路交口）',  //地址
                    postcode: '230001',                                 //邮编
                },
            ]
        });
    },
    chooseAddress: function () {
        wx.chooseAddress({
            success: function (res) {
                console.log(res.userName)
                console.log(res.postalCode)
                console.log(res.provinceName)
                console.log(res.cityName)
                console.log(res.countyName)
                console.log(res.detailInfo)
                console.log(res.nationalCode)
                console.log(res.telNumber)
            }
        })
    }
})